import requeat from '../utils/request'
//前缀
const urlPrefix = 'enterprise'
const headers={
	'Authorization': localStorage.getItem(`${urlPrefix}_token`)
}

export function login(params={}){
	return requeat({
		url:`/${urlPrefix}/login`,
		method:'post',
		params
	})
}
export function register(params={}){
	return requeat({
		url:`/${urlPrefix}/register`,
		method:'post',
		params
	})
}

export function getJob(params={}){
	return requeat({
		url:`/${urlPrefix}/get_job`,
		method:'get',
		headers:{
			'Authorization': localStorage.getItem(`${urlPrefix}_token`)
		},
		params
	})
}
export function delJob(params={}){
	return requeat({
		url:`/${urlPrefix}/del_job`,
		method:'post',
		headers:{
			'Authorization': localStorage.getItem(`${urlPrefix}_token`)
		},
		params
	})
}
export function addJob(params={}){
	return requeat({
		url:`/${urlPrefix}/add_job`,
		method:'post',
		headers:{
			'Authorization': localStorage.getItem(`${urlPrefix}_token`)
		},
		params
	})
}
export function editJob(params={}){
	return requeat({
		url:`/${urlPrefix}/edit_job`,
		method:'post',
		headers:{
			'Authorization': localStorage.getItem(`${urlPrefix}_token`)
		},
		params
	})
}
export function getJobById(params={}){
	return requeat({
		url:`/${urlPrefix}/getJobById`,
		method:'get',
		headers:{
			'Authorization': localStorage.getItem(`${urlPrefix}_token`)
		},
		params
	})
}
export function getMsgList(params={}){
	return requeat({
		url:`/${urlPrefix}/getMsgList`,
		method:'get',
		headers:{
			'Authorization': localStorage.getItem(`${urlPrefix}_token`)
		},
		params
	})
}

export function setReaded(params={}){
	return requeat({
		url:`/setReaded`,
		method:'get',
		headers:{
			'Authorization': localStorage.getItem(`${urlPrefix}_token`)
		},
		params
	})
}
// export default{
// 	login,
// 	register
// }